<div class="storeUploads form">
<?php echo $this->Form->create('StoreUpload', array('url'=>array('plugin'=>'store','controller'=>'uploads','action'=>'add'),'type' => 'file'));?>
	<fieldset>
 		<legend><?php __d('store','Add Store Upload'); ?></legend>
	<?php
		echo $this->Form->hidden('StoreProductUpload.product_id');
		echo $form->input('StoreUpload.0.file', array('type' => 'file'));
	?>
	</fieldset>
<?php echo $this->Form->end(__d('store','Submit', true));?>
</div>

<div class="storeUploads index">
	<h2><?php __d('store','Store Uploads');?></h2>
	<table class="index" cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('name');?></th>
			<th><?php echo $this->Paginator->sort('type');?></th>
			<th><?php echo $this->Paginator->sort('size');?></th>
			<th><?php echo $this->Paginator->sort('created');?></th>
			<th><?php echo $this->Paginator->sort('modified');?></th>
			<th class="actions"><?php __d('store','Actions');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($storeUploads as $storeUpload):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $storeUpload['StoreUpload']['id']; ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($fileUpload->image($storeUpload['StoreUpload']['name'],array('autoResize'=>true,'width'=>60,'imagePathOnly'=>false))
			,array('plugin'=>'store','controller'=>'uploads','action'=>'view',$storeUpload['StoreUpload']['id'],$product_id)
			,array('escape'=>false)); ?>&nbsp;
		</td>
		<td><?php echo $storeUpload['StoreUpload']['type']; ?>&nbsp;</td>
		<td><?php echo $storeUpload['StoreUpload']['size']; ?>&nbsp;</td>
		<td><?php echo $storeUpload['StoreUpload']['created']; ?>&nbsp;</td>
		<td><?php echo $storeUpload['StoreUpload']['modified']; ?>&nbsp;</td>
		<td class="actions">
			
			<?php echo $html->link($html->image('firma/actions_16_view.png',array('title'=>__d("store","View",true))), 
		        array('plugin'=>'store','controller'=>'uploads','action'=>'view',$storeUpload['StoreUpload']['id'],$product_id),
		        array('escape'=>false,'class'=>'')); ?>
			<?php echo $html->link($html->image('firma/actions_16_edit.png',array('title'=>__d("store","View",true))), 
		        array('plugin'=>'store','controller'=>'uploads','action'=>'edit',$storeUpload['StoreUpload']['id'],$product_id),
		        array('escape'=>false,'class'=>'','rel'=>"prettyPhoto[iframe]")); ?>
			<?php echo $this->Html->link($html->image('firma/actions_16_delete.png',array('title'=>__d("store","View",true))), array('plugin'=>'store','controller'=>'uploads','action'=>'delete', $storeUpload['StoreUpload']['id'],$product_id), array('escape'=>false), sprintf(__d('store','Are you sure you want to delete # %s?', true),$storeUpload['StoreUpload']['id'])); ?>
				    			
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __d('store','Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __d('store','previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__d('store','next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>

<?php if($session->check('Auth.User.id')){?>
<?php echo $this->element('toolbar_actions_main',array('plugin'=>'store','toolbar'=>'uploads'))?>
<?php }?>	
	